package com.itcast.peft.entity;

import org.springframework.ai.chat.messages.Message;

import lombok.AllArgsConstructor;
import lombok.Data;

@Data
@AllArgsConstructor
public class RoleMessage {
    String role;
    String content;

    public static RoleMessage fromNormalMessage(Message m) {
        return new RoleMessage(m.getMessageType().getValue(), m.getText());
    }
}